package com.example.discover_model;

import android.view.View;
import android.widget.Button;

import com.example.baseadapter_sdk.BaseQuickAdapter;
import com.example.baseadapter_sdk.BaseViewHolder;
import com.example.discover_model.entity.DataDTO;

public class FindAdapter extends BaseQuickAdapter<DataDTO> {
    public FindAdapter( ) {
        super(R.layout.item_find);
    }

    @Override
    public void convert(BaseViewHolder holder, DataDTO item) {
        holder.setText(R.id.find_title, item.title);
        holder.setText(R.id.find_describe, item.intro);
        holder.setImage(R.id.find_img, item.icon);
        Button find_attention = holder.getView(R.id.find_attention);
        if (item.hasFollow)
            find_attention.setText("已关注");
        else
            find_attention.setText("关注");

    }
}
